﻿using System.Modules.Contracts.DTO;
using System.Modules.Extensions;
namespace System.Modules.SharePoint.Contracts.DTO
{
    /// <summary>
    /// Task List Item
    /// </summary>
    public class EventListItem : BaseListItem
    {
        #region Constants
        private const string EVENT_FORMAT = "{EventListItem.Title} ({EventListItem.EventDate} - {EventListItem.EndDate})";
        private const string EVENT_RECURRENCE_FORMAT = "{EventListItem.Title} ({EventListItem.RecurrenceID} - {EventListItem.RecurrenceID})";
        #endregion

        #region FieldNames enum
        /// <summary>
        /// FieldNames
        /// </summary>
        public new enum FieldNames
        {
            /// <summary>
            /// EventDate
            /// </summary>
            EventDate,

            /// <summary>
            /// EndDate
            /// </summary>
            EndDate,

            /// <summary>
            /// RecurrenceID
            /// </summary>
            RecurrenceID
        }
        #endregion

        #region Properties
        /// <summary>
        /// EventDate
        /// </summary>
        public Updatable<DateTime> EventDate { get; set; }

        /// <summary>
        /// EndDate
        /// </summary>
        public Updatable<DateTime> EndDate { get; set; }

        /// <summary>
        /// RecurrenceID
        /// </summary>
        public Updatable<DateTime> RecurrenceID { get; set; }
        #endregion

        #region Override
        /// <summary>
        /// Overrides To String
        /// </summary>
        /// <returns></returns>
        public override string ToString()
        {
            return EVENT_FORMAT.SetPlaceHoldersValues(this);
        }
        #endregion
    }
}